import 'package:flutter/material.dart';

///**
///* @author hrongyong
///* @date   1/26/21
///* @email hrongyong@gmail.com
///* Description: 饼图model
///*/
///饼图数据model
class EquallyDividedPieChartDataModel {
  //标题 - 名称
  String name;

  //比例(0.0 - 1.0)
  double proportion;

  String subTitle;

  Color color;

  EquallyDividedPieChartDataModel(
      {@required this.name,
      @required this.proportion,
      this.subTitle,
      this.color = const Color(0xFF288BC7)}) {
    if (proportion != null) {
      if (proportion > 1.0) {
        proportion = 1.0;
      }
      if (proportion < 0.0) {
        proportion = 0.0;
      }
    }
  }
}
